/* 样式配置表 */
/* 用于基础样式定制化配置 */

// 经典flex布局
@mixin flex($jc: left, $alignI: flex-start, $wrap: nowrap, $direction: row) {
  display: flex;
  justify-content: $jc;
  align-items: $alignI;
  flex-wrap: $wrap;
  flex-direction: $direction;
}

// 设置宽高
@mixin size($width, $height:$width){
  width: $width;
  height: $height;
}

// 背景图
@mixin bgImg($link, $color:initial, $size:100%){
  background: url("~@/assets/"+$link) 0 0 no-repeat;
  background-color: $color;
  background-size: $size;
}

// 多行超出省略，适用于webkit内核的浏览器
@mixin boxClamp($v:1){
  overflow:hidden;
  -webkit-line-clamp: $v;
  line-clamp: $v;
  -webkit-box-orient: vertical;
  box-orient: vertical;
  display:-webkit-box;
  display:box;
}
// 设置定位了类型以及位置的偏移量
@mixin position($position,$args:top 0 right 0 bottom 0 left 0){
  @each $o in top right bottom left {
    $i: index($args, $o);
    @if $i and $i + 1 <= length($args) and type-of(nth($args, $i + 1)) == number {
      #{$o}: nth($args, $i + 1);
    }
  }
  position: $position;
}
  